<?php
namespace app\mini\controller\commons;

use app\common\logic\ServiceShopLogic;
use app\common\traits\InterfacesExceptionTrait;
use think\Request;
use think\response\Json;

class MainBusiness extends Base
{
    use InterfacesExceptionTrait;

    public $ServiceShopLogic;

    public function __construct(Request $request = null)
    {
        parent::__construct($request);
        $this->ServiceShopLogic = new ServiceShopLogic();
    }

    /**
     * 主营业务列表
     * @return Json
     */
    public function index()
    {
        $res = $this->exception(function () {
            return $this->ServiceShopLogic->main_business(request()->param());
        });
        return $this->response($res);
    }

}